package cn.iocoder.yudao.module.game.dal.mysql.workOrder;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.game.dal.dataobject.workOrder.WorkOrderDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.game.controller.admin.workOrder.vo.*;

/**
 * 工单管理 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface WorkOrderMapper extends BaseMapperX<WorkOrderDO> {

    default PageResult<WorkOrderDO> selectPage(WorkOrderPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WorkOrderDO>()
                .likeIfPresent(WorkOrderDO::getMemberName, reqVO.getMemberName())
                .betweenIfPresent(WorkOrderDO::getAmount, reqVO.getAmount())
                .orderByDesc(WorkOrderDO::getId));
    }

}